﻿<%@ page contentType="text/html; charset=UTF-8"%>
<%@ include file="/commons/taglibs.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<link href="${ctx}/css/main/base.css" rel="stylesheet" type="text/css"/>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>
<s:if test="face.ieTitle==null">
</s:if>
<s:else>
<s:property value="face.ieTitle"/>
</s:else>
</title>
<script type="text/javascript" src="${ctx }/scripts/commons/jquery-1.2.3.pack.js"></script>
<script type="text/javascript" src="${ctx }/scripts/commons/jquery.MultiFile.js"></script>
<script language="javascript" type="text/javascript">
var view_flag1=1;
var frame_rows = parent.parent.parent.document.getElementById("frame1").rows;
function HideList(id)
{
	var el=document.getElementById(id);
	if(view_flag1==1)
	{
      parent.parent.parent.document.getElementById("frame1").rows="0"+frame_rows.substr(frame_rows.indexOf(","));
      el.src="${ctx}/images/main/timg52.gif";
      el.alt="";
  }
	else
	{
	  parent.parent.parent.document.getElementById("frame1").rows=frame_rows;
      el.src="${ctx}/images/main/timg5.gif";
      el.alt=""; 
  }

  view_flag1=1-view_flag1;
}

function openURL(URL)
{
  	 parent.main.location=URL;
}
function re_login()
{
     parent.parent.location="${ctx}/front/loginindex.action";
}

function re_exit()
{
     msg="<s:text name="bg.exit.message"/>";
  if(window.confirm(msg))
     parent.parent.location="${ctx}/front/loginindex!exit.action";
}
function re_main()
{
    
     parent.parent.location="${ctx}/front/index!frontIndex.action";
}
function langSelecter_onChanged() {
document.langForm.submit();
parent.parent.location="${ctx}/front/loginindex.action";
}
var searchId;
var remaindId;
function searchNewSms(){
		$.ajax({
			type:"get",
			url:"${ctx}/sms/smsAction!searchNewSms.action",
			data:"?" + new Date().getTime(),
			dataType:"json",
			success:function (json){
				var flag = json.flag;
				if(flag==1){
					remaind();
				}else{
				stopRemaind();
				}
			},
			error:function (){
				//alert("系统异常!");
			}
		});
}
function startSearch(){
	searchId=setInterval("searchNewSms()",100000);
}
function remaind(){
	document.getElementById("sms1").src="${ctx}/images/main/sms1.gif";
}
function stopRemaind(){
   document.getElementById("sms1").src="${ctx}/images/main/timg_r.gif";
}
function lookSms(){
 URL="${ctx}/sms/smsAction!findNewSms.action";
 myleft=(screen.availWidth-400)/2;
 mytop=250
 mywidth=400;
 myheight=200;
 window.open(URL,"read","height="+myheight+",width="+mywidth+",status=1,toolbar=no,menubar=no,location=no,scrollbars=yes,top="+mytop+",left="+myleft+",resizable=yes");
}
</script>
<s:bean id="locales" name="com.person.commons.utils.Locales"/>
</head>
<body onload="">
<input type="hidden" name="request_locale" value="${session['WW_TRANS_I18N_LOCALE']}"/>
<input type="hidden" name="user.userId" value="${user.userId}"/>
<div class="nav">
	<div class="navleft" ><h1 class="limg"><img src="${ctx}/images/main/timg_r.gif" id="sms1"/></h1>
	<s:property value="user.userName"></s:property></div>
	<div class="navr">
		<ul>
			<a href="${ctx}/front/index!viewMain.action" target="framemain"><li class="navimg"><img src="${ctx}/images/main/timg1.gif" alt="<s:text name="bg.nav.destop"/>"/></li><li><s:text name="bg.nav.destop"/></li></a>
			<a href="${ctx}/front/user!controlPanel.action" target="framemain"><li class="navimg"><img src="${ctx}/images/main/timg2.gif" alt="<s:text name="bg.nav.conmessage"/>"/></li><li><s:text name="bg.nav.control"/></li></a>
			<a href="javascript:re_login();"><li class="navimg"><img src="${ctx}/images/main/timg3.gif" alt="<s:text name="bg.nav.reloginmessage"/>"/></li><li><s:text name="bg.nav.relogin"/></li></a>
			<a href="javascript:re_exit();"><li class="navimg"><img src="${ctx}/images/main/timg4.gif" alt="<s:text name="bg.nav.return"/>"/></li><li><s:text name="bg.nav.exit"/></li></a>
		    <li class="navimg"><a href="javascript:HideList('timg5');"><img src="${ctx}/images/main/timg5.gif" alt="" id="timg5"/></a></li><li></li>
		</ul>
	</div>
</div>
</body>
</html>
